import { VersionParams as Params } from "@swda/configs/params"

let SWDA_Version = {}

Scene_Title.prototype.createVersion = function () {
    this._titleVersionSprite = new Sprite(new Bitmap(Graphics.width, Graphics.height));
    this.addChild(this._titleVersionSprite);

    const versionText = Params.VersionNumberText + Params.VersionNumber;
    const updateText = Params.UpdateDateText + Params.UpdateDate;
    const fontSize = Params.fontSize;
    const x = Params.versionX;
    const y = Params.versionY;
    const align = Params.Align;

    this._titleVersionSprite.bitmap.fontSize = fontSize;
    this._titleVersionSprite.bitmap.textColor = '#999999';
    this._titleVersionSprite.bitmap.outlineWidth = 0;
    this._titleVersionSprite.bitmap.drawText(versionText, x, y, Graphics.width, fontSize, align);
    // this._titleVersionSprite.bitmap.drawText(updateText, x, y + fontSize + 4, Graphics.width, fontSize, align);
}


SWDA_Version.Scene_Title_createForeground = Scene_Title.prototype.createForeground;
Scene_Title.prototype.createForeground = function () {
    SWDA_Version.Scene_Title_createForeground.call(this);
    this.createVersion()
};